/*
 * Copyright 2006-2008 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.martinimix.service.product;

import java.math.BigDecimal;

import com.bluemartini.htmlapp.Sku;

import net.martinimix.domain.product.Product;
import net.martinimix.domain.product.ProductNotFoundException;
import net.martinimix.domain.product.SkuNotFoundException;

/**
 * Provides a product service.
 * 
 * @author Scott Rossillo
 *
 */
public interface ProductService {
	
	/**
	 * Returns the product identified by the given product id.
	 * 
	 * @param id the product identifier for the <code>Product</code>
	 * to be returned
	 * 
	 * @return the <code>Product</code> with the given <code>id</code>
	 * or <code>null</code> if a product cannot be found
	 */
	public Product findProductById(Long id) throws ProductNotFoundException;
	
	/**
	 * Returns the price for the given product identifier.
	 * 
	 * @param productId the product identifier for the <code>Product</code>
	 * whose price will be returned
	 * 
	 * @return a <code>BigDecimal</code> containing the price for the given
	 * <code>productId</code>
	 */
	public BigDecimal getProductPrice(Long productId);
	
	/**
	 * Returns the SKU identified by the given id.
	 * 
	 * @param id the identifier for the SKU to be returned
	 * 
	 * @return the <code>Sku</code> identified by the given
	 * <code>id</code>
	 * 
	 * @throws SkuNotFoundException no sku with the given
	 * <code>id</code> could be found
	 */
	public Sku findSku(Long id) throws SkuNotFoundException;

}
